package day08HomeWrok;

public class day08HomeWork2 {
    public static void main(String[] args) {
        Animal[] animals = new Animal[5];
        animals[0] = new Dog("小红",5,"红");
        animals[1] = new Chick("小金",5,"金");
        animals[2] = new Chick("大金",5,"金");
        animals[3] = new Fish("小白",5,"白");
        animals[4] = new Fish("小绿",5,"绿");
        for (int i = 0; i < animals.length ; i++) {
            animals[i].eat();
            animals[i].drink();
        }


    }
}
